import request from '@/utils/request'

// 获取列表
export const articleList = (params) => {
    return request.get('/course-article/list', { params })
}

// 获取文章详情
export const article = (params) => {
    return request.get('/course-article', { params })
}

// 获取词汇测试列表
export const vocabularyExamList = (params) => {
    return request.get('/course-article/read-list', { params })
}


/**
 * 获取文章详情
 * @param String keyword 
 * @returns void
 */
export function getArticleParticulars(id) {
	return new Promise((resolve, reject) => {
        const params = { id: id }
		request.get('/course-article/particulars', { params }).then(res => {
			resolve(res.data)
		}).catch(error => {
			reject(error)
		})
	})
}
